import requests from '../index'

// 获取banner数据的请求
export const reqBannerList = () => {
	return requests({
		method: 'GET',
		url: '/banner?type=2'
	})
}

// 获取发现好歌单
export const reqDiscoverGoodMusicList = () => {
	return requests({
		method: 'GET',
		url: '/personalized?limit=10'
	})
}

// 搜索
export const reqSearch = (keyword) => {
	return requests({
		method: 'GET',
		url: `/search?keywords=${keyword}`
	})
}

// 用二维码登录啊
// 生成二维码key的接口
export const createQRkey = () => {
	return requests({
		method: 'GET',
		url: '/login/qr/key'
	})
}
// 用上面接口拿到的key来获取二维码
export const reqQRcode = (key) => {
	return requests({
		method: 'GET',
		url: `/login/qr/create`,
		data: {
			key: key,
			qrimg: 'qrimg'
		}
	})
}

// 推荐新音乐
export const reqRecommendNewMusic = () => {
	return requests({
		method: 'GET',
		url: '/personalized/newsong'
	})
}


